#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
//int main()
//{
//  printf("hello world\n");
//  return 111;
//}

//int main()
//{
//  printf("hello world");
//  exit(100);
//
//}
//


int main()
{
  pid_t id = fork();
  if(id>0)
  {
    //父进程
    
       printf("我是子进程,我的pid = %d,我的ppid = %d \n",getpid(),getppid());
    
  }
  else
  {
    while(1)
    {
       printf("我是子进程,我的pid = %d,我的ppid = %d \n",getpid(),getppid());
    }
    //子进程
  }

  return 0;
}
